#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project ：图灵学习 
@File    ：5.在页面源代码中获取指定数据.py
@IDE     ：PyCharm 
@Author  ：ChenLiGao
@Date    ：2024-11-28 15:16
'''
import re

html_document = """
<div class="el">
        <p class="t1">           
            <span>
                <a>Python开发工程师</a>
            </span>
        </p>
        <span class="t2">南京</span>
        <span class="t3">1.5-2万/月</span>
</div>
<div class="el">
        <p class="t1">
            <span>
                <a>java开发工程师</a>
            </span>
		</p>
        <span class="t2">苏州</span>
        <span class="t3">1.5-2/月</span>
</div>
"""

results = re.findall(r'class="t1">.*?<a>(.*?)</a>', html_document, re.DOTALL)
print(results)